<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
  <script src="https://cdn.bootcdn.net/ajax/libs/vue/2.6.10/vue.js"></script>
</head>
<body>
    <div id="app">
    <!-- 收集select单选,要把v-model写在select上,使用字符串收集 -->
      <h1>请选择你的答案</h1>
      <select v-model="ans">
        <option value="A">A</option>
        <option value="B">B</option>
        <option value="C">C</option>
        <option value="D">D</option>
      </select>

    <!-- 收集select多线,要把v-model写在select上,使用数组收集(收集多个同类型数据) -->
        <h1>请选择你喜欢的学科</h1>
        <select v-model="project" multiple>
            <option value="A">前端</option>
            <option value="B">Java</option>
            <option value="C">测试</option>
            <option value="D">产品</option>
            <option value="E">UI</option>
            <option value="F">运维</option>
        </select>
    </div>
    <script>
      const vm = new Vue({
        el:"#app",
        data(){
          return{
            ans:"A",
            project:[],
          }
        }
      })
    </script>
</body>
</html>